﻿@model IEnumerable<DCH.Areas.Admin.Models.News>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>


<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.imageThumbnail)
        </th>
        <th>
             @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Date)
        </th>
       
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.imageThumbnail)
        </td>
        <td>
            @Html.ActionLink(item.Title, "Details", new { id=item.ID })   
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.description)
        </td>
        <td>
           @item.Date.ToShortDateString()
        </td>
       
    </tr>
}

</table>
